package com.fxwater.websocket;

import com.fxwater.websocket.job.SelectRealData;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.web.WebApplicationInitializer;

/**
 * web容器中进行部署
 * 
 * @author ruoyi
 */
public class WebsocketServletInitializer implements ApplicationListener<ContextRefreshedEvent> {

    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        SelectRealData.initRedisCacheInfo();
    }
}
